﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JoinExamination.aspx.cs" Inherits="ExaminationSys.View.Student.JoinExamination" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<!-- saved from url=(0014)about:internet -->
<head runat="server">
    <title>&#32451;&#20064;/&#27979;&#35797;</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link type="text/css" rel="stylesheet" media="all" href="../../css/style.css" />
    <style type="text/css">
       .plq{margin:15px 0 5px 50px;}
       .chkrad{margin:10px 0 0 25px; font-size: 25px;font-weight: bold;}
       .prefix{margin:0 0 0 5px; font-size: 25px;font-weight: bold;}
       .subject{margin:2px 20px 0 1px; font-size: 25px;font-weight: bold; line-height: 17px;letter-spacing:0.5mm;
                list-style-position: outside;list-style-type: decimal; font-family: "微软雅黑"; line-height:35px}
       .subjectprefix{float:left; margin-right:10px;}
       .ques-choosecont2{ padding:20px 0 10px 30px; font-size:25px; font-family:Arial; line-height:25px;}
       .subjectanswer{margin: 0 0 0 15px;font-size: 22px;letter-spacing:0.1mm;font-weight: normal}       
       .btn{width:168px; height:43px; background-image:url('../../Images/btnbg.gif'); background-repeat: no-repeat; font-size:25px; 
            text-align:center; padding:10px 0 0 0; background-color:transparent; color:White; cursor:hand; border-style:none; font-weight:bold;}
       .img{ }
       .more{ text-align:right; position:absolute; right:30px; bottom:15px}
       .morea{ background:url(../images/i07.gif) no-repeat left center; padding-left:15px; text-decoration: underline}
       .mv{ margin:10px 0 0 80px;}
       .subjec_a{ margin:5px 20px 5px 0; text-align:right;}
       .shitingdiv{margin:5px 0 10px 0; text-align:center;}
    </style>
    <script type="text/javascript">
        function fullScreen() {
            window.moveTo(0, 0);
            window.resizeTo(screen.width, screen.height);
        }
        function showSubject(id, title) {
            var url = "JoinExaminationSubject.aspx?subjuecttempid=" + id;
            //            alert(url);
            window.open(url, title,
                'status=no,menubar=no,top=0,left=0,width=970,height=700,resizable=yes,scrollbars=yes');
        }
    </script>      
</head>
<body onload="fullScreen();" style="width:100%;">
    <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" DirectMethodNamespace="X" />
        <div class="main985" runat="server" id="questionvp">
	        <div class="main985-tbg">
    	        <div class="main985-bbg main985-bbg02">
                    <div class="questions-cont">
                        <asp:Panel ID="AllPanel" runat="server" Visible="false" Width="955px" Height="330px" style="padding-left:100px;">                         
                        </asp:Panel> 
                        <div id="questionlistdiv" runat="server"></div>
                        <div style="text-align:left;margin:0 auto; width:757px; height:185px; display:none;
                            background-image:url('../../Images/box757.gif')" id="questionresultdiv"> 
                            <%--<asp:Literal ID="zsd" runat="server"></asp:Literal>--%>
                            <div style="padding:15px 0 0 15px;">
                                <asp:Image runat="server" ID="imgDefaultResult" CssClass="img" 
                                    ImageUrl="../../Images/x-05.gif" Height="74px" Width="120px"></asp:Image>
                                <asp:Image runat="server" ID="imgErrorResult" CssClass="img" ImageUrl="../../images/i12.gif" Visible="false"></asp:Image>
                                <asp:Image runat="server" ID="imgRightResult" CssClass="img" ImageUrl="../../images/i13.gif" Visible="false"></asp:Image>                                
                            </div>
                            <div style="font-weight:bold; font-size:20px; width:700px; margin:15px 0 5px 15px; table-layout:fixed;">
                                <div style="float:left;" runat="server" id="txtknowledge" visible="false">
                                    <span class="tit">相关知识点：<asp:Label runat="server" ID="lblknowledge" Visible="false"></asp:Label></span>
                                </div>
                                <div id="knowledgediv" style="float:left;">
                                        
                                </div>
                            </div>
                        </div> 
                        <div class="buttom">
                	        <div style="float:right; margin:5px 30px 10px 10px;">
                                <asp:Button ID="btnNextQuestion" runat="server" Text="下一题" CssClass="btn" 
                                  OnClientClick="getStqValue();"  OnClick="Next_Click2">                                    
                                </asp:Button>
                            </div>
                            <div style="float:right; margin:5px 5px 10px 10px;">
                                <asp:Button ID="btnSure" runat="server" Text="确 定" CssClass="btn" 
                                   OnClientClick="getStqValue();"  OnClick="Sure_Click2">
                                </asp:Button>
                            </div>
                            <div class="main985-top" style="text-align:left; margin:15px 0 0 45px;">
                                <a class="ico" id="back1" runat="server" href="../../StudentCenter.aspx">返回</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="main985" runat="server" id="resultvp" visible="false">
            <div class="main985-tbg">
                <div class="main985-bbg main985-bbg01">
                    <div class="main985-top"><a class="ico" runat="server" id="back2" href="/StudentCenter.aspx">&#36820;&#22238;</a></div>
                    <div class="test-title"><asp:Label runat="server" ID="lblPaperTitle" Text=""></asp:Label></div>
                    <div class="complete-cont">
                        <h1 class="red"><span><asp:Label runat="server" ID="lblscore" Text=""></asp:Label></span></h1>
                        <h3 class="red"><asp:Label runat="server" ID="lblscoremessage" Text=""></asp:Label></h3>
                        <ul>
                            <li><label>&#27491;&#30830;&#39064;&#25968;&#65306;</label><span class="fs"><asp:Label runat="server" ID="lblRightQuestion" Text=""></asp:Label></span></li>
                            <li><label>&#38169;&#35823;&#39064;&#25968;&#65306;</label><span class="fs"><asp:Label runat="server" ID="lblErrorQuestion" Text=""></asp:Label></span></li>
                            <%--<li><label>&#30693;&#35782;&#28857;&#19977;</label> <span class="pft"><img src="../../images/f100.gif" alt=""/></span><span class="fs">100%</span></li>--%>
                        </ul>
                        <div class="btm">
                           <%--<uc:JoinExamination runat="server" ID="ucJoinExamination" />    --%>   
                           <script type="text/javascript">
                                function barRenderer(sprite, record, attr, index, store) {
                                    var fieldValue = Math.random() * 20 + 10,
                                    value = (record.get('DataValue') >> 0) % 5,
                                    color = ['rgb(213, 70, 121)',
                                                'rgb(44, 153, 201)',
                                                'rgb(146, 6, 157)',
                                                'rgb(49, 149, 0)',
                                                'rgb(249, 153, 0)'][value];

                                                               return Ext.apply(attr, {
                                                                   fill: color
                                                               });
                                                           }
                            </script>
                            <ext:Panel ID="PanelChart" runat="server" Width="400" Height="300" Layout="FitLayout">
                                <Items>
                                    <ext:Chart ID="Chart2" runat="server" Shadow="true" StyleSpec="background:#fff" Animate="true">
                                        <Store>
                                            <ext:Store ID="Store2" runat="server"
                                                AutoDataBind="true">
                                                <Model>
                                                    <ext:Model ID="Model2" runat="server">
                                                        <Fields>
                                                            <ext:ModelField Name="Name" />
                                                            <ext:ModelField Name="DataValue" />
                                                        </Fields>
                                                    </ext:Model>
                                                </Model>
                                            </ext:Store>
                                        </Store>
                                        <Axes>
                                            <ext:NumericAxis Fields="DataValue" Grid="true" Title="正确率(%)" Minimum="0" Maximum="100">
                                                <Label>
                                                    <Renderer Handler="return Ext.util.Format.number(value, '0,0');" />
                                                </Label>
                                            </ext:NumericAxis>
                                            <ext:CategoryAxis Position="Bottom" Fields="Name" Title="测试时间" />
                                        </Axes>
                                        <Series>
                                            <ext:ColumnSeries Axis="Left" Highlight="true" XField="Name" YField="DataValue">
                                                <Tips ID="Tips1" runat="server" TrackMouse="true" Width="340" Height="28">
                                                    <Renderer Handler="this.setTitle('测试时间：'+storeItem.get('Name') + '   正确率: ' + storeItem.get('DataValue'));" />
                                                </Tips>
                                                <Label Display="InsideEnd" Field="DataValue" Orientation="Horizontal" Color="#333" TextAnchor="middle">
                                                    <Renderer Handler="return Ext.util.Format.number(value, '0');" />
                                                </Label>
                                                <Renderer Fn="barRenderer" />
                                            </ext:ColumnSeries>
                                        </Series>
                                    </ext:Chart>
                                </Items>
                            </ext:Panel>              
                         </div>
                    </div>
                </div>
            </div>
        </div>

        <asp:HiddenField ID="studentID" runat="server"></asp:HiddenField>
        <asp:HiddenField ID="paperID" runat="server"></asp:HiddenField>
        <asp:HiddenField ID="sthID" runat="server"></asp:HiddenField>
        <asp:HiddenField ID="hidsectionid" runat="server"></asp:HiddenField>
        <input type="hidden" runat="server" id="hidquestioncount" value="0" />
        <input type="hidden" runat="server" id="txtindex" value="1" />
        <input type="hidden" runat="server" id="stqidValue" value="" />
        <input type="hidden" runat="server" id="stqanswerValue" value="" />
        <script type="text/javascript" language="javascript">
            var setKonledge = function (param) {
                try {

                    var obj = document.getElementById('knowledgediv');
                    if (obj != null && obj != "undefine") {
                        obj.innerHTML = param;
                    }
                } catch (e) {
                    alert(e);
                }
            };
            var showquestion = function (index) {
                for (var i = 1; i < index; i++) {
                    var obj=document.getElementById("questiondiv_" + i.toString());
                    if (obj != null && obj != "undefine") {
                        obj.style.display = "none";
                    }
                }
                var obj2 = document.getElementById("questiondiv_" + index.toString())
                if (obj2 != null && obj2 != "undefine") {
                    obj2.style.display = "block";
                }
            };
            var showselectedanser = function (index, answer) {
                if (answer != null && answer.length > 0) {
                    var rowob = document.getElementsByName("radchk_" + index.toString());
                    if (rowob != null && rowob != "undefine") {
                        var rowcount = rowob.length;
                        for (var i = 0; i < rowcount; i++) {
                            rowob[i].checked = answer.indexOf(rowob[i].value) != -1;
                        }
                    }
                }
            };
            function getStqValue() {
                var index = document.getElementById("txtindex").value;
                var obj1 = document.getElementById("lblq_" + index.toString());
                if (obj1 != null && obj1 != "undefine") {
                    var stqid = obj1.value;
                    document.getElementById("stqidValue").value = stqid;

                    var rowob = document.getElementsByName("radchk_" + index.toString());
                    if (rowob != null && rowob != "undefine") {
                        var rowcount = rowob.length;
                        var valuestr = "";
                        for (var i = 0; i < rowcount; i++) {
                            if (rowob[i].checked && rowob[i].id.indexOf("radchk_") != -1) {
                                valuestr += rowob[i].value;
                            }
                        }
                    }
                    document.getElementById("stqanswerValue").value = valuestr;
                }
            }
            var setShowHidden = function (str) {
                try {
                    var obj = document.getElementById('questionresultdiv');
                    if (obj != null && obj != "undefine") {
                        obj.style.display = str;
                    }
                } catch (e) {
                    alert(e);
                }
            };
        </script>
        
    </form>
</body>
</html>
